﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Utilities.Logging {
    public static class scLoggingAccess {


        private static ocLogger oLogger;

        private static ocLogger getSingletonAccess() {
            if (oLogger != null) return oLogger;
            else { oLogger = new ocLogger(); return oLogger; }
        }

        public static bool Log_Single(string sFilename, string sText) {
            return getSingletonAccess().Log_Single(sFilename, sText);
        }

        public static bool Log(string sText) {
            return getSingletonAccess().Log(sText);
        }

        public static bool Start_ContinuousLog(string sFilename) {
            return getSingletonAccess().Start_ContinuousLog(sFilename);
        }
        public static bool Start_TimedHybridLog(string sFilename, int iSeconds) {
            return getSingletonAccess().Start_TimedHybridLog(sFilename, iSeconds);
        }

        public static bool Stop_ContinuousLog() {
            return getSingletonAccess().Stop_ContinuousLog();
        }

        public static bool Stop_TimedHybridLog() {
            return getSingletonAccess().Stop_TimedHybridLog();
        }

        public static string Setting_DefaultFilename {
            get {
                return getSingletonAccess().Setting_DefaultFilename;
            }
            set {
                getSingletonAccess().Setting_DefaultFilename = value;
            }
            
        }
    }
}
